@ var head={
<title>Bug管理</title>
<link rel="stylesheet" href="${CONTEXT_PATH}/static/js/kindeditor-4.1.10/themes/simple/simple.css">

@}; var ctrls= "ng-controller='BugCtrls'" ; var body ={
        
 <div class="easyui-layout" data-options="fit : true,border : false"  >

@if( so.hasPermission("/system/bug/add")) {
  <div  ng-model="so_add" ng-init="so_add=true"></div>
@}if( so.hasPermission("/system/bug/edit")) {
  <div  ng-model="so_eidt" ng-init="so_edit=true"></div>
@}if( so.hasPermission("/system/bug/delete")) {
  <div  ng-model="so_delete" ng-init="so_delete=true"></div>
@}if( so.hasPermission("/system/bug/view")) {
  <div  ng-model="so_view" ng-init="so_view=true"></div>
@}if( so.hasPermission("/common/file/fileManage")) {
 <div  ng-model="so_fm" ng-init="so_fm=true"></div>
@}if( so.hasPermission("/system/bug/status")) {
 <div  ng-model="so_status" ng-init="so_status=true"></div>
@}
		<div data-options="region:'north',title:'查询条件',border:false" style="height: 160px; overflow: hidden;">
			<form id="searchForm">
				<table class="table table-hover table-condensed" style="display: none;">
					<tr>
						<th>BUG名称</th>
						<td><input name="name" placeholder="可以模糊查询" class="span2" /></td>
						<th>BUG类型</th>
						<td>
						<select name="type" class="easyui-combobox" data-options="width:140,height:29,editable:false,panelHeight:'auto'"> 
						<option value="1">错误
						<option value="2">功能
						</select></td>
					</tr>
					<tr>
						<th>创建时间</th>
						<td ><input class="span2" name="createdateStart" placeholder="点击选择时间" onclick="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})" />至<input class="span2" name="createdateEnd" placeholder="点击选择时间" onclick="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})" /></td>
				 <th>BUG状态</th>
					<td>
					<select name="status" class="easyui-combobox" data-options="width:140,height:29,editable:false,panelHeight:'auto'">
					<option value="1">待处理
					<option value="2">已处理
					<option value="3">忽略
					</select>
					</td>
					</tr>
					<tr>
						<th>最后修改时间</th>
						<td colspan="3"><input class="span2" name="modifydateStart" placeholder="点击选择时间" onclick="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})" />至<input class="span2" name="modifydateEnd" placeholder="点击选择时间" onclick="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})" /></td>
					</tr>
				</table>
			</form>
		</div>
		<div data-options="region:'center',border:false">
			<table id="dataGrid"></table>
		</div>
	
	<div id="toolbar" style="display: none;">
		 <a ng-show="so_add"  ng-click="addFun()" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'bug_add'">添加</a>
		<a  href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'brick_add',plain:true" ng-click="searchFun();">过滤条件</a><a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'brick_delete',plain:true" ng-click="cleanFun();">清空条件</a>
	
	</div>

	<div id="menu" class="easyui-menu" style="width: 120px; display: none;">
	
	         <div ng-show="so_add" ng-click="addFun();" data-options="iconCls:'pencil_add'">增加</div>
			<div ng-show="so_delete" ng-click="deleteFun();" data-options="iconCls:'pencil_delete'">删除</div>
			<div ng-show="so_edit" ng-click="editFun();" data-options="iconCls:'pencil'">编辑</div>
	</div>
	<!--  dialog -->
  <div id="dlg"   class="easyui-dialog" style=" width:800px;height:550px;padding:5px 10px" closed="true" buttons="#dlg-buttons"  data-options="resizable:true,modal:true">
	
<div class="easyui-layout" data-options="fit:true,border:false">
	<div data-options="region:'center',border:false" title="" style="overflow: hidden;">
		<form id="fm" method="post">
		<input name="bug.id" type="hidden"  >
			<table class="table table-hover table-condensed">
				<tr>
					<th>BUG名称</th>
					<td><input name="bug.name" type="text" placeholder="请输入BUG名称" class="easyui-validatebox span2" data-options="required:true"  ></td>
					<th> </th>
					<td></td>
				</tr>
				<tr>
				  <div  ng-show="so_fm">
				 	<th>浏览服务器附件</th>
					 	<td>
					 	<button type="button" class="btn"  ui-event="{click:'fileManage($event)'}"  ng-click="fileManage()">浏览服务器</button>
					 </td>
			      </div>
				 <th>BUG类型</th>
					<td>
					<select name="bug.type" class="easyui-combobox" data-options="required:true,width:140,height:29,editable:false,panelHeight:'auto'">
					<option value="1">错误
					<option value="2">功能
					</select>
					</td>
				</tr>
				<tr>
					<td colspan="4"><textarea name="bug.des" id="note" cols="50" rows="5" style="visibility: hidden;"> </textarea></td>
				</tr>
			</table>
		</form>
	</div>
</div>
  </div>
    <div id="dlg-buttons">
        <a href="javascript:void(0)" class="easyui-linkbutton"   ng-click="submit()">确定</a>
        <a href="javascript:void(0)" class="easyui-linkbutton"  onclick="javascript:$('#dlg').dialog('close')">取消</a>
    </div> 
	<!--  dialog  view  -->
  <div id="dlg2"   class="easyui-dialog" style=" width:850px;height:580px;padding:5px 10px" closed="true" buttons="#dlg-buttons2"  data-options="resizable:true,modal:true">
<div class="easyui-layout" data-options="fit:true,border:false">
	<div data-options="region:'center',border:false" title="" style="overflow: hidden;">
		<input name="bug.id" type="hidden"  >
			<table class="table table-hover table-condensed">
				<tr><td colspan="4"><textarea   id="note2" cols="50" rows="5" style="visibility: hidden;"> </textarea></td></tr>
			</table>
	</div>
</div>
  </div>
    <div id="dlg-buttons2">
        <a href="javascript:void(0)" class="easyui-linkbutton"  onclick="javascript:$('#dlg2').dialog('close')">取消</a>
    </div> 	

 <div id="dlg-status"   class="easyui-dialog" style=" width:340px;height:150px;padding:5px 10px" closed="true" buttons="#dlg-buttons-status"  data-options="resizable:true,modal:true">
	
  <div class="easyui-layout" data-options="fit:true,border:false">
	<div data-options="region:'center',border:false" title="" style="overflow: hidden;">
		<form id="fm-status" method="post">
		    <input id="ids" name="ids" type="hidden" class="span2"  >
			<input name="bug.id" type="hidden" class="span2"  >
			<table class="table table-hover table-condensed">
				<tr>
					<th>修改状态</th>
					<td>
					<select id="bug_status" class="easyui-combobox" name="bug.status" style="width: 140px; height: 29px;">
					<option value="1">待处理
					<option value="2">已处理
					<option value="3">忽略
					</select><img src="${CONTEXT_PATH}/static/js/ext/style/images/extjs_icons/cut_red.png" ng-click="$('#bug_status').combobox('clear');" /></td>
				</tr>
			</table>
		</form>
	 </div>
    </div>
     </div>
  <div id="dlg-buttons-status" >
        <a href="javascript:void(0)" class="easyui-linkbutton"   ng-click="submitStatus('#fm-status','#dlg-status')">确定</a>
        <a href="javascript:void(0)" class="easyui-linkbutton"  onclick="javascript:$('#dlg-status').dialog('close')">取消</a>
 </div>
 
 <div ng-init="load()"></div>
</div>  
@};var js={
<script  type="text/javascript">
var  formatterFun=function(value, row, index) {
		var str = '';
		@if( so.hasPermission("/system/bug/view")) 
			str += $.formatString('<img   onclick="$(this).scope().viewFun(\'{0}\')"  src="{1}" title="查看"/>', row.id, PATH+'/static/js/ext/style/images/extjs_icons/bug/bug_link.png');
		@if( so.hasPermission("/system/bug/edit")) 
			str += $.formatString('<img   onclick="$(this).scope().editFun(\'{0}\')"  src="{1}" title="编辑"/> ', row.id, PATH+'/static/js/ext/style/images/extjs_icons/bug/bug_edit.png');
		@if( so.hasPermission("/system/bug/delete")) 
			str += $.formatString('<img  onclick="$(this).scope().deleteFun(\'{0}\');" src="{1}" title="删除"/>', row.id, PATH+'/static/js/ext/style/images/extjs_icons/bug/bug_delete.png');
		@if( so.hasPermission("/system/bug/status")) 
			str += $.formatString('<img   onclick="$(this).scope().statusFun(\'{0}\',1);" src="{1}" title="修改状态"/>', row.id, PATH+'/static/js/ext/style/images/extjs_icons/bug/bug_go.png');
		@
			return str;
}
</script>
<script type="text/javascript" src="${CONTEXT_PATH}/static/js/kindeditor-4.1.10/kindeditor-all-min.js" charset="utf-8"></script>
<script src="${CONTEXT_PATH}/static/app/ctrls/bug-ctrls.js" type="text/javascript"></script>

 @}; include("../layout/_layout.html",{head:head,body:body,js:js,ctrls:ctrls}) {}
